package com.qumitech.visualnovel.pubdef.pubenum;

import java.util.ArrayList;
import java.util.List;

public enum GameTypeEnum {
    pound_egg("pound_egg", "滴滴", "0"),
    magic_box("magic_box", "哒哒", "1"),
    supreme_egg("supreme_egg", "至尊", "2"),
    wish_bottle("wish_bottle", "许愿瓶", "3"),
    blow_nian_beast("blow_nian_beast", "炸年兽", "4"),
    plant("plant", "活力种树", "5"),
    farm("farm", "开心农场", "6"),
    star_trek("star_trek", "星际迷航", "7"),
    muchangwuyu("muchangwuyu", "牧场物语", "8"),
    treasure_hunt("treasure_hunt", "魔力寻宝", "9"),
    kitten_fishing("kitten_fishing", "小猫钓鱼", "10"),
    find_mole("find_mole", "打地鼠", "11"),
    ;

    private String fieldName;

    private String fieldNameCHN;

    private String fieldNumber;

    GameTypeEnum(String fieldName, String fieldNameCHN, String fieldNumber){
        this.fieldName = fieldName;
        this.fieldNameCHN = fieldNameCHN;
        this.fieldNumber = fieldNumber;
    }

    public String getFieldName(){
        return fieldName;
    }

    public String getFieldNameCHN(){
        return fieldNameCHN;
    }

    public String getFiledNumber() {return fieldNumber;}

    public static String getGameTypeCHN(String gameType) {
        GameTypeEnum[] gameTypes = GameTypeEnum.values();
        for (GameTypeEnum type : gameTypes) {
            if (type.getFieldName().equals(gameType)) {
                return type.getFieldNameCHN();
            }
        }
        return "未知";
    }

    public static List<String> listGameType() {
        List<String> gameTypes = new ArrayList<>();
        GameTypeEnum[] gameTypeEnums = GameTypeEnum.values();
        for (GameTypeEnum gameTypeEnum: gameTypeEnums) {
            gameTypes.add(gameTypeEnum.getFieldName());
        }
        return gameTypes;
    }

}
